// response共有类型
export interface ResponseData {
    code:number,
    message:string,
    ok:boolean
}

// 接口返回的response中的data类型
export interface CategoryObj {
    id:string | number,
    name:string,
    category1Id?: number,
    category2Id?: number
}

export interface CategoryResponseData extends ResponseData {
    data:Array<CategoryObj>
}

//品牌属性及属性值返回的response
export interface AttrObj {
    id?:number,
    valueName:string,
    attrId?:number,
    flag?:boolean
}

export type AttrObjList = Array<AttrObj>

export interface Attr {
    id?:number,
    attrName:string,
    categoryId:number|string,
    categoryLevel:number,
    attrValueList:AttrObjList
}

//response的data类型
export type AttrList = Array<Attr>

//response类型
export interface AttrResponseData extends ResponseData{
    data:AttrList
}